﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;

namespace Haushaltsbuch.DataAcces.Entities
{
    public class User
    {
        public int Id { get; set; }

        [MaxLength(255)]
        public string Username { get; set; }

        public byte[] Passwort { get; set; }

        public string Firstname { get; set; }
        public string Lastname { get; set; }
        public ISet<Role> Roles { get; set; }

        public string Fullname
        {
            get { return string.Format("{0}, {1}", this.Lastname, this.Firstname); }
        }
    }
}